package com.proxy.daijia.rules.controller;

import com.proxy.daijia.common.result.Result;
import com.proxy.daijia.model.form.rules.FeeRuleRequestForm;
import com.proxy.daijia.model.vo.rules.FeeRuleResponseVo;
import com.proxy.daijia.rules.service.FeeRuleService;
import io.swagger.v3.oas.annotations.Operation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Slf4j
@RestController
@RequestMapping("/rules/fee")
@SuppressWarnings({"unchecked", "rawtypes"})
public class FeeRuleController {


    @Autowired
    private FeeRuleService feeRuleService;

    @PostMapping("/calculateOrderFee")
    @Operation(summary = "计算订单费用")
    public Result<FeeRuleResponseVo> calculateOrderFee(@RequestBody FeeRuleRequestForm feeRuleRequestForm) {
        return feeRuleService.calculateOrderFee(feeRuleRequestForm);
    }



}

